package cn.blunce.utils.ScreenHelper;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

import cn.blunce.mylib.R;

public class ScreenTest extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_screen_test);

        GetUISize size = new GetUISize(this);
        ((TextView) findViewById(R.id.text1)).setText("屏幕分辨率：" + size.getScreenWidth() + "x" + size.getScreenHeight());
        ((TextView) findViewById(R.id.text2)).setText("像素密度：" + size.getPixelDesity() + "dpi");
        ((TextView) findViewById(R.id.text3)).setText("放大像素：" + size.getPixelMagnify());
        ((TextView) findViewById(R.id.text4)).setText("每1像素多少dp：" + "1 px = " + size.getPixelPerDp() + "dp");
    }
}
